import { createRouter, createWebHistory } from 'vue-router'
import login from '../views/login.vue'
import register from '../views/register.vue'
import control from '../views/control.vue'
import normal from '../views/normal.vue'
import china from '../views/china.vue'
import goods from '../views/goods.vue'
import message from '../views/message.vue'
import user from '../views/user.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {path:'/',component:login},
    {path:'/login',component:login},
    {path:'/register',component:register},
    {path:'/control',component:control,
     children:[
      {path:'/normal',component:normal},
      {path:'/china',component:china},
      {path:'/goods',component:goods},
      {path:'/message',component:message},
      {path:'/user',component:user}
     ]},
  ]
})

export default router
